const Mock = require("mockjs");
module.exports = (app) => {
  app.get("/api/list", (req, res) => {
    const data = Mock.mock({
      "list|10": [
        {
          title: "@ctitle",
          "image|5-10": ["@image(120x80, @color)"],
          desc: "@cword(10, 20)",
          id: "@id",
        },
      ],
    });
    res.send({
      code: 200,
      data: data.list,
      message: "ok",
    });
  });
};
